home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS26.ADF / SoundScape / Include / sampler.h < prev    next >
C/C++ Source or Header  |  1989-01-26  |  2KB  |  66 lines

  1. /*    SAMPLER.H 
  2. *     
  3. *    (c) 12-20-85    Todor Fay 
  4. */ 
  5.  
  6. struct EnvelopeInfo {
  7.     struct EnvelopeInfo *next;
  8.     unsigned char index;
  9.     struct IOAudio *startmsg, *loopmsg, *flushmsg;
  10.     unsigned char port;
  11.     unsigned char stage;
  12.     unsigned char value;
  13.     unsigned char channel;
  14.     long rate1, rate2, rate3, rate4;
  15.     long level1, leve2, level3;
  16.     unsigned short volume;
  17.     unsigned short period;
  18.     unsigned char amplitude;
  19.     char posslope;
  20.     long pad[8];
  21. };
  22.  
  23. struct SoundData { 
  24.     char *data; 
  25.     UWORD loopstart; 
  26.     UWORD loopend; 
  27.     UWORD length; 
  28.     UWORD start; 
  29. }; 
  30.  
  31. struct ChannelData { 
  32.     int rate1, rate2, rate3, rate4; 
  33.     int level1, level2, level3; 
  34.     long pad[8];                /* Future expansion! */ 
  35.     unsigned short sensitivity; 
  36.     unsigned short start; 
  37.     unsigned short loopstart; 
  38.     unsigned short loopend; 
  39.     unsigned short pbendamount;            /* Current pitchbend index. */ 
  40.     unsigned short pbendrange;            /* Current pitchbend range. */ 
  41.     short tune;                    /* Tuning factor. */ 
  42.     struct SoundData sounddata[10]; 
  43.     unsigned short pbend[129];            /* Tuned, scaled pitchbend. */ 
  44.     char name[20]; 
  45.     char transpose; 
  46.     char status; 
  47.     char type; 
  48. }; 
  49.  
  50. #define CD_TMASK     0x0F 
  51. #define CD_DOLOOPS     0x10 
  52. #define CD_DOUBLE    0x20 
  53. #define CD_SAVED    0x40 
  54. #define CD_MARK        0x80 
  55. #define CD_EMPTY    0x00 
  56.  
  57. struct SamplerState { 
  58.     long length; 
  59.     char namesfile[40]; 
  60.     struct ChannelData *channeldata[16];
  61.     struct Envelopeinfo *envelopeinfo;
  62.     struct MsgPort *soundport;
  63.     long addchannel;
  64. }; 
  65.  
  66.